<include file="Public:header" />

<div class="page-content">
    <!-- content starts -->
    <div class="cig-page-header">
        <ul class="breadcrumb">
            <li>

                <a href="{:U('/Problem/index')}">问题管理</a>
            </li>

            <li class="active">添加问题</li>
        </ul>
    </div>
   <div class="row">
    <div class="col-md-12">
        <div class="box-inner">

            <div class="box-content">

                <div class="row">
                    <div class="col-xs-12">
                        <br />
                        <form class="form-horizontal" action="{:U('/Problem/save')}" method="POST">
                            <div class="form-group">
                                <label for="" class="col-sm-2 control-label no-padding-right"><em>*</em>Title:</label>
                                <div class="col-sm-10">
                                    <input type="text" class="col-xs-10 col-sm-5 required" name="title" value="{$content.title}" id="">
                                    <span class="cig-tip"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-sm-2 control-label no-padding-right"><em>*</em>Time Limit:</label>
                                <div class="col-sm-10">
                                    <input type="text" class="col-xs-10 col-sm-5 required" name="time_limit:" value="{$content.time_limit}" id="">
                                    <span class="cig-tip"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-sm-2 control-label no-padding-right"><em>*</em>Memory Limit:</label>
                                <div class="col-sm-10">
                                    <input type="text" class="col-xs-10 col-sm-5 required" name="memory_limit" value="{$content.memory_limit}" id="">
                                    <span class="cig-tip"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-sm-2 control-label no-padding-right"><em>*</em>Description:</label>
                                <div class="col-sm-8">
                                    <!-- 加载编辑器的容器 -->
                                    <script id="description" name="description" >{$content.description}</script>
                                    <!-- 配置文件 -->
                                    <script type="text/javascript" src="/ueditor/ueditor.config.js"></script>
                                    <!-- 编辑器源码文件 -->
                                    <script type="text/javascript" src="/ueditor/ueditor.all.js"></script>
                                    <!-- 实例化编辑器 -->
                                    <script type="text/javascript">
                                        var ue = UE.getEditor('description',{
                                            toolbars: [[
                                                'fullscreen', 'source', '|', 'undo', 'redo', '|',
                                                'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
                                                'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
                                                'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
                                                'directionalityltr', 'directionalityrtl', 'indent', '|',
                                                'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|', 'emotion',  'insertcode', '|',
                                                'horizontal', 'date', 'time', 'spechars','|',
                                                'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
                                                'print', 'preview', 'searchreplace', 'help', 'drafts'
                                            ]]
                                        });
                                    </script>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-sm-2 control-label no-padding-right"><em>*</em>Input:</label>
                                <div class="col-sm-8">
                                    <!-- 加载编辑器的容器 -->
                                    <script id="input" name="input" >{$content.input}</script>
                                    <!-- 配置文件 -->
                                    <!-- 实例化编辑器 -->
                                    <script type="text/javascript">
                                        var ue = UE.getEditor('input',{
                                            toolbars: [[
                                                'fullscreen', 'source', '|', 'undo', 'redo', '|',
                                                'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
                                                'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
                                                'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
                                                'directionalityltr', 'directionalityrtl', 'indent', '|',
                                                'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|', 'emotion',  'insertcode', '|',
                                                'horizontal', 'date', 'time', 'spechars','|',
                                                'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
                                                'print', 'preview', 'searchreplace', 'help', 'drafts'
                                            ]]
                                        });
                                    </script>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-sm-2 control-label no-padding-right"><em>*</em>Output:</label>
                                <div class="col-sm-8">
                                    <!-- 加载编辑器的容器 -->
                                    <script id="output" name="output" >{$content.output}</script>
                                    <script type="text/javascript">
                                        var ue = UE.getEditor('output',{
                                            toolbars: [[
                                                'fullscreen', 'source', '|', 'undo', 'redo', '|',
                                                'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
                                                'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
                                                'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
                                                'directionalityltr', 'directionalityrtl', 'indent', '|',
                                                'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|', 'emotion',  'insertcode', '|',
                                                'horizontal', 'date', 'time', 'spechars','|',
                                                'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
                                                'print', 'preview', 'searchreplace', 'help', 'drafts'
                                            ]]
                                        });
                                    </script>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-sm-2 control-label no-padding-right"><em>*</em>Sample Input:</label>
                                <div class="col-sm-10">
                                    <input type="text" class="col-xs-10 col-sm-5 required" name="sample_output" value="{$content.sample_output}" id="">
                                    <span class="cig-tip"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-sm-2 control-label no-padding-right"><em>*</em>Sample Output:</label>
                                <div class="col-sm-10">
                                    <input type="text" class="col-xs-10 col-sm-5 required" name="sample_output" value="{$content.sample_output}" id="">
                                    <span class="cig-tip"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-sm-2 control-label no-padding-right"><em>*</em>Test Input:</label>
                                <div class="col-sm-10">
                                    <input type="text" class="col-xs-10 col-sm-5 required" name="test_input" value="{$content.input}" id="">
                                    <span class="cig-tip"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-sm-2 control-label no-padding-right"><em>*</em>Test Output:</label>
                                <div class="col-sm-10">
                                    <input type="text" class="col-xs-10 col-sm-5 required" name="test_output" value="{$content.output}" id="">
                                    <span class="cig-tip"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-sm-2 control-label no-padding-right"><em>*</em>Hint:</label>
                                <div class="col-sm-8">
                                    <!-- 加载编辑器的容器 -->
                                    <script id="hint" name="hint" >{$content.hint}</script>
                                    <script type="text/javascript">
                                        var ue = UE.getEditor('hint',{
                                            toolbars: [[
                                                'fullscreen', 'source', '|', 'undo', 'redo', '|',
                                                'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
                                                'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
                                                'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
                                                'directionalityltr', 'directionalityrtl', 'indent', '|',
                                                'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|', 'emotion',  'insertcode', '|',
                                                'horizontal', 'date', 'time', 'spechars','|',
                                                'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
                                                'print', 'preview', 'searchreplace', 'help', 'drafts'
                                            ]]
                                        });
                                    </script>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-sm-2 control-label no-padding-right"><em>*</em>SpecialJudge:</label>
                                <div class="col-sm-10">
                                    <label>
                                        <if condition="($content.spj eq 0)"> 
                                            <input name="spj" type="radio" class="ace" value="0" checked="true">
                                        <else/>
                                            <input name="spj" type="radio" class="ace" value="0" >
                                        </if>
                                        <span class="lbl">No</span> </label>&nbsp;&nbsp;&nbsp;&nbsp;
                                    <label>
                                        <if condition="($content.spj eq 1)"> 
                                            <input name="spj" type="radio" value="1" class="ace" checked="true">
                                        <else/>
                                            <input name="spj" type="radio" value="1" class="ace">
                                        </if>
                                        <span class="lbl">Yes</span> </label>
                                    <span class="cig-tip"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="" class="col-sm-2 control-label no-padding-right"><em>*</em>Source:</label>
                                <div class="col-sm-10">
                                    <input type="text" class="col-xs-10 col-sm-5 required" name="source" value="{$content.source}" id="">
                                    <span class="cig-tip"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label no-padding-right" for=""><em>*</em>difficulty:</label>
                                <div class="col-sm-10">
                                    <div class="col-sm-5 no-padding">
                                        <select class="difficulty" id="chosen1" name="difficult"  data-placeholder="difficulty">
                                            <if condition="($content.difficult eq 0)"> 
                                            <option selected="selected" value="0">-----0-----</option>
                                            <else /><option value="0">-----0-----</option></if>           

                                            <if condition="($content.difficult eq 1)">
                                            <option selected="selected" value="1">-----1-----</option>
                                            <else /><option value="1">-----1-----</option></if>

                                            <if condition="($content.difficult eq 2)">
                                            <option selected="selected" value="2">-----2-----</option>
                                            <else /><option value="2">-----2-----</option></if>

                                            <if condition="($content.difficult eq 3)">
                                            <option selected="selected" value="3">-----3-----</option>
                                            <else /><option value="3">-----3-----</option></if>

                                            <if condition="($content.difficult eq 4)">
                                            <option selected="selected" value="4">-----4-----</option>
                                            <else /><option value="4">-----4-----</option></if>

                                        </select>
                                    </div>
                                </div>
                            </div>
                            <input type="hidden" name="id" value={$content.problem_id} >
                            <div class="clearfix form-actions">
                                <div class="col-md-3 col-xs-3"></div>
                                <div class="col-md-9 col-xs-9">
                                    <button type="submit" class="save-btn btn btn-success"><i class="ace-icon fa fa-check"></i> 保 存 </button>
                                    <button type="button" class="btn btn-grey" onclick="javascript:histroy.go(-1)"><i class="ace-icon fa fa-close bigger-110"></i> 取 消 </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--/row-->

</div>

    <!--/row-->

</div>
<!--content-->
<div> </div>

<include file="Public:footer" />
